home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-2.iso / extra_2 / regcode.zip / REGCODE.H < prev    next >
C/C++ Source or Header  |  1995-10-28  |  2KB  |  57 lines

  1. //////////////////////////////////////////////////////////////////
  2.  
  3. /* For C programs use the following prototype */
  4.  
  5.    int regcode( char*  instring,       /* user's name */
  6.                 double incode,         /* author's code */
  7.                 char*  outcode,        /* registration code */
  8.                 long   copyright       /* removes copyright notice */
  9.                )
  10.  
  11. ////////////////////////////////////////////////////////////////
  12.  
  13. // If you are calling RegCode from a C++ program, include the
  14. // following code:
  15.  
  16. #include <windows.h>
  17.  
  18. #ifndef __regcode_h
  19. #define __regcode_h
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24.  
  25. int _pascal regcode( LPSTR  in_string, 
  26.                      double incode,
  27.                      LPSTR  outcode, 
  28.                      LONG   copyright );
  29.  
  30. #ifdef __cplusplus
  31. } // extern "C"
  32. #endif
  33.  
  34. #endif // __regcode_h
  35.  
  36. ////////////////////////////////////////////////////////////////
  37. If using Visual Basic use: 
  38.  
  39. Declare Function regcode Lib "c:\vb\regdemo\regcode.dll"
  40.    ( ByVal ustring As String,
  41.      ByVal incode  As Double,
  42.      ByVal outcode As String,
  43.      ByVal copyright  As Long )   As Integer
  44.  
  45.     Dim x As Integer
  46.     Dim incode As Double
  47.     Dim outcode As String * 10
  48.     Dim ustring As String * 64
  49.     Dim copyright As Long
  50.     ...
  51.     x = regcode( ustring, incode, outcode, copyright )
  52.  
  53. The path specified in the Declare statement must be modified to suit
  54. your path.  The Declare statement must appear on a single line.
  55.  
  56. /////////////////////////////////////////////////////////////////////
  57.